package com.tledu.spring.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tledu.spring.domain.Cus;
import org.apache.ibatis.annotations.Param;

/**
 * @author  Lsj
 * @date  2021/7/5 9:12
 * @version 1.0
 */

public interface CusMapper extends BaseMapper<Cus> {
    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(Cus record);

    /**
     * 登录
     * @param c_name
     * @return
     */
    Cus selectAllByC_name(@Param("c_name")String c_name);

    /**
     * 根据id查询用户
     * @param c_id
     * @return
     */
    Cus selectAllByC_id(@Param("c_id")Integer c_id);

    /**
     * 修改
     * @param updated
     * @param c_id
     * @return
     */
    int updateByC_id(@Param("updated")Cus updated,@Param("c_id")Integer c_id);

    /**
     * 删除
     * @param c_id
     * @return
     */
    int deleteByC_id(@Param("c_id")Integer c_id);
}